
/*"Exposure to Confederate Monuments: The Political Effect of Non-Intervention"
TABLES */

clear all

*Set working directory* 
cd "H:\Personal\Datos\Confederate paper\Replication\Data\"


* ∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞ *
* ············································································ *
						* TABLES IN MANUSCRIPT *                          
* ············································································ *
* ∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞ *

* ············································································ *
						   * TABLE 1 *                          
* ············································································ *

use dataset.dta, clear
table race democratlean southborn

* ············································································ *
						   * TABLE 2 *                          
* ············································································ *
use dataset.dta, clear
* Signals
sum town_proud_south town_support_withdrawing_us town_republican blm_personal ///
blm_town conflict_history care_fight_crime care_equality care_parking care_parks     
* Emtoions   
sum hostility disgust sadness pride fear joy anger
* Attitudes and semi-behavioral outcomes
sum  valued_community external_efficacy  trust_town good_place_to_live ///
 donationyn donation

 
 
* ∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞ *
* ············································································ *
						* TABLES IN APPENDIX *                          
* ············································································ *
* ∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞ *




* ············································································ *
						   * TABLE A.1 *                          
* ············································································ *
use dataset.dta, clear
regr failacheck treatment, r


* ············································································ *
						   * TABLE A.2 *                          
* ············································································ *


use dataset.dta, clear


*First time running test 
clear
gen variable = . 
save mean_nonstdvar.dta, replace


* Additional times running the test*
use mean_nonstdvar.dta, clear
drop _all
gen variable = . 
save mean_nonstdvar.dta, replace

use dataset.dta, clear

local nssignals   care_parks care_parking care_equality care_fight_crime conflict_history  blm_town blm_personal  town_republican  town_support_withdrawing_us town_proud_south            
foreach signal in `nssignals'{
	mean `signal' if treatment == 0
	regsave `signal' using "mean_nonstdvar.dta", ci level(95) append addlabel (Condition, 0, Typeout, 1, Level, 95)
}
local nssignals   care_parks care_parking care_equality care_fight_crime conflict_history  blm_town blm_personal  town_republican  town_support_withdrawing_us town_proud_south            
foreach signal in `nssignals'{
	mean `signal' if treatment == 1
	regsave `signal' using "mean_nonstdvar.dta", ci level(95) append addlabel (Condition, 1, Typeout, 1, Level, 95)
}


local nsemotions anger joy fear pride sadness disgust hostility
foreach emotion in `nsemotions'{
	mean `emotion'  if treatment == 0
	regsave `emotion' using "mean_nonstdvar.dta", ci level(95) append addlabel (Condition, 0, Typeout, 2, Level, 95)
}
local nsemotions anger joy fear pride sadness disgust hostility
foreach emotion in `nsemotions'{
	mean `emotion'  if treatment == 1
	regsave `emotion' using "mean_nonstdvar.dta", ci level(95) append addlabel (Condition, 1, Typeout, 2, Level, 95)
}


local nsoutcomes good_place_to_live trust_town external_efficacy valued_community donation donationyn
foreach outcome in `nsoutcomes'{
	mean `outcome' if treatment == 0
	regsave `outcome' using "mean_nonstdvar.dta", ci level(95) append addlabel (Condition, 0, Typeout, 3, Level, 95)
}
local nsoutcomes good_place_to_live trust_town external_efficacy valued_community donation donationyn
foreach outcome in `nsoutcomes'{
	mean `outcome' if treatment == 1
	regsave `outcome' using "mean_nonstdvar.dta", ci level(95) append addlabel (Condition, 1, Typeout, 3, Level, 95)
}

use mean_nonstdvar.dta, clear
drop variable
sort Typeout Condition
br


* ············································································ *
						   * TABLE A.3 *                          
* ············································································ *
use main_hte.dta, clear
br if typeout == 1 & analysis != 2 & Controls == 0

* Full sample
br if typeout == 1 & dataset == 0 & Controls == 0
* Black subsample
br if typeout == 1 & dataset == 1 & subset == 1 & Controls == 0
* White subsample
br if typeout == 1 & dataset == 1 & subset == 2 & Controls == 0
* Democrat subsample
br if typeout == 1 & dataset == 2 & subset == 1 & Controls == 0
* Republican subsample
br if typeout == 1 & dataset == 2 & subset == 2 & Controls == 0

* ············································································ *
						   * TABLE A.4 *                          
* ············································································ *
use main_hte.dta, clear
br if typeout != 1 & analysis != 2 & Controls == 0

* Full sample
br if typeout != 1 & dataset == 0 & Controls == 0
* Black subsample
br if typeout != 1 & dataset == 1 & subset == 1 & Controls == 0
* White subsample
br if typeout != 1 & dataset == 1 & subset == 2 & Controls == 0
* Democrat subsample
br if typeout != 1 & dataset == 2 & subset == 1 & Controls == 0
* Republican subsample
br if typeout != 1 & dataset == 2 & subset == 2 & Controls == 0

* ············································································ *
						   * TABLE A.5 *                          
* ············································································ *

use difference.dta, clear
* For the full table *
br if dataset == 1

* Signals *
br if dataset == 1 & typeout == 1

* Emotions *
br if dataset == 1 & typeout == 2

* Attitudes and Quasi-behavioral*
br if dataset == 1 & typeout == 3


* ············································································ *
						   * TABLE A.6 *                          
* ············································································ *
use difference.dta, clear
* For the full table *
br if dataset == 2

* Signals *
br if dataset == 2 & typeout == 1

* Emotions *
br if dataset == 2 & typeout == 2

* Attitudes and Quasi-behavioral*
br if dataset == 2 & typeout == 3


* ············································································ *
						   * TABLE A.7 *                          
* ············································································ *
use main_hte.dta, clear
sort subset dataset var2 var


* Full sample, with and without controls
br if typeout == 1 & dataset == 0 & Controls == 2
br if typeout == 1 & dataset == 0 & Controls == 0
* Black subsample, with and without controls
br if typeout == 1 & dataset == 1 & subset == 1 & Controls == 2
br if typeout == 1 & dataset == 1 & subset == 1 & Controls == 0
* White subsample, with and without controls
br if typeout == 1 & dataset == 1 & subset == 2 & Controls == 2
br if typeout == 1 & dataset == 1 & subset == 2 & Controls == 0
* Democrat subsample, with and without controls
br if typeout == 1 & dataset == 2 & subset == 1 & Controls == 2
br if typeout == 1 & dataset == 2 & subset == 1 & Controls == 0
* Republican subsample, with and without controls
br if typeout == 1 & dataset == 2 & subset == 2 & Controls == 2
br if typeout == 1 & dataset == 2 & subset == 2 & Controls == 0

* ············································································ *
						   * TABLE A.8 *                          
* ············································································ *
use main_hte.dta, clear
sort subset dataset var2 var

* Full sample, with and without controls
br if typeout == 2 & dataset == 0 & Controls == 2
br if typeout == 2 & dataset == 0 & Controls == 0
* Black subsample, with and without controls
br if typeout == 2 & dataset == 1 & subset == 1 & Controls == 2
br if typeout == 2 & dataset == 1 & subset == 1 & Controls == 0
* White subsample, with and without controls
br if typeout == 2 & dataset == 1 & subset == 2 & Controls == 2
br if typeout == 2 & dataset == 1 & subset == 2 & Controls == 0
* Democrat subsample, with and without controls
br if typeout == 2 & dataset == 2 & subset == 1 & Controls == 2
br if typeout == 2 & dataset == 2 & subset == 1 & Controls == 0
* Republican subsample, with and without controls
br if typeout == 2 & dataset == 2 & subset == 2 & Controls == 2
br if typeout == 2 & dataset == 2 & subset == 2 & Controls == 0



* ············································································ *
						   * TABLE A.9 *                          
* ············································································ *
use main_hte.dta, clear
sort subset dataset var2 var

* Full sample, with and without controls
br if typeout == 3 & dataset == 0 & Controls == 2
br if typeout == 3 & dataset == 0 & Controls == 0
* Black subsample, with and without controls
br if typeout == 3 & dataset == 1 & subset == 1 & Controls == 2
br if typeout == 3 & dataset == 1 & subset == 1 & Controls == 0
* White subsample, with and without controls
br if typeout == 3 & dataset == 1 & subset == 2 & Controls == 2
br if typeout == 3 & dataset == 1 & subset == 2 & Controls == 0
* Democrat subsample, with and without controls
br if typeout == 3 & dataset == 2 & subset == 1 & Controls == 2
br if typeout == 3 & dataset == 2 & subset == 1 & Controls == 0
* Republican subsample, with and without controls
br if typeout == 3 & dataset == 2 & subset == 2 & Controls == 2
br if typeout == 3 & dataset == 2 & subset == 2 & Controls == 0


* ············································································ *
						   * TABLE B.1 *                          
* ············································································ *
use covariate_test.dta, clear
br



